/**
* 左边菜单
*/
<template>
  <el-menu
    :collapse="collapsed"
    :default-active="$route.path"
    active-text-color="#ffd04b"
    background-color="#334157"
    class="el-menu-vertical-demo"
    collapse-transition
    router
    text-color="#fff"
    unique-opened
  >
    <div class="logobox">
      <img alt class="logoimg" src="../assets/img/FBiteLogo3.png"/>
    </div>

    <el-menu-item :index="'/'+homemenu.url">
      <i :class="homemenu.icon" class="iconfont"></i>
      <span slot="title">{{homemenu.menuname}}</span>
    </el-menu-item>

    <el-submenu :index="menu.menuname" :key="menu.menuid" v-for="menu in ordermenu">
      <template slot="title">
        <i :class="menu.icon" class="iconfont"></i>
        <span>{{menu.menuname}}</span>
      </template>
      <el-menu-item-group>
        <el-menu-item :index="'/'+chmenu.url" :key="chmenu.menuid" v-for="chmenu in menu.menus">
          <i :class="chmenu.icon" class="iconfont"></i>
          <span>{{chmenu.menuname}}</span>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>

    <el-menu-item :index="'/'+settingsmenu.url">
      <i :class="settingsmenu.icon" class="iconfont"></i>
      <span slot="title">{{settingsmenu.menuname}}</span>
    </el-menu-item>
  </el-menu>
</template>
<script>

    export default {
        name: "leftnav",
        data() {
            return {
                collapsed: false,
                homemenu: {
                    menuid: 1,
                    icon: "icon-cat-skuQuery",
                    menuname: "主页",
                    hasThird: null,
                    url: "system/Home",
                    menus: null
                },
                ordermenu: [
                    {
                        menuid: 2,
                        icon: "li-icon-xitongguanli",
                        menuname: "订单管理",
                        hasThird: null,
                        url: null,
                        menus: [
                            {
                                menuid: 21,
                                icon: "icon-cus-manage",
                                menuname: "收件订单输入",
                                hasThird: "N",
                                url: "system/ReceivingOrders",
                                menus: null
                            },
                            {
                                menuid: 22,
                                icon: "icon-cus-manage",
                                menuname: "非收派订单输入",
                                hasThird: "N",
                                url: "system/AtypicalOrders",
                                menus: null
                            },
                            {
                                menuid: 23,
                                icon: "icon-news-manage",
                                menuname: "匹配结果",
                                hasThird: "N",
                                url: "system/MatchingResult",
                                menus: null
                            },
                            {
                                menuid: 24,
                                icon: "icon-cat-skuBasic",
                                menuname: "地图定位",
                                hasThird: "N",
                                url: "system/MapResult",
                                menus: null
                            },
                        ]
                    }
                ],
                settingsmenu: {
                    menuid: 3,
                    icon: "icon-cms-manage",
                    menuname: "引擎配置",
                    hasThird: null,
                    url: "system/EngineSettings"
                }
            };
        }
    };
</script>
<style>
  .el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 240px;
    min-height: 400px;
  }

  .el-menu-vertical-demo:not(.el-menu--collapse) {
    border: none;
    text-align: left;
  }

  .el-menu-item-group__title {
    padding: 0px;
  }

  .el-menu-bg {
    background-color: #1f2d3d !important;
  }

  .el-menu {
    border: none;
  }

  .logobox {
    height: 80px;
    line-height: 80px;
    color: #9d9d9d;
    font-size: 20px;
    text-align: center;
    padding: 15px 20px 0px 5px;
  }

  .logoimg {
    height: 60px;
  }
</style>
